package top.goldenyear.porpoise.system.auth.service;

import org.noear.solon.annotation.Component;
import org.noear.solon.annotation.Inject;
import top.goldenyear.porpoise.system.permission.model.RouteTree;
import top.goldenyear.porpoise.system.permission.service.RolePermissionService;

/**
 * @author airhead
 */
@Component
public class RouteService {
  @Inject private RolePermissionService rolePermissionService;

  public RouteTree getUserRoutes() {
    return rolePermissionService.treeRoute();
  }

  public Boolean isRouteExist(String routeName) {
    return rolePermissionService.isRouteExist(routeName);
  }
}
